#pragma once
#include<iostream>
using namespace std;

template<class T>
struct ListNode {
	T data;
	ListNode<T>* left;
	ListNode<T>* right;
	ListNode(ListNode<T>* a = NULL, ListNode* b = NULL) :left(a), right(b) {}
	ListNode(T d, ListNode<T>* a = NULL, ListNode<T>* b = NULL) :data(d), left(a), right(b) {}
};


